package com.example.demo.service;

import com.example.demo.dao.CustomMapper;
import com.example.demo.entity.Privilege;
import com.example.demo.entity.Role;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CustomServiceImpl implements CustomService {

    @Autowired
    private CustomMapper customMapper;


    @Override
    public List<Role> findRoleByUserId(int userId) {
        return customMapper.findRoleByUserId(userId);
    }

    @Override
    public List<Privilege> findPrivilegeByRoleId(int roleId) {
        return customMapper.findPrivilegeByRoleId(roleId);
    }
}
